<template>
	<el-table
	    :data="tableData"
	    border
	    style="width: 100%">
	    <el-table-column
	      fixed
	      prop="id"
	      label="ID"
	      width="150">
	    </el-table-column>
	    <el-table-column
	      prop="username"
	      label="姓名"
	      width="120">
	    </el-table-column>
	    <el-table-column
	      prop="password"
	      label="密码"
	      width="120">
	    </el-table-column>
	    <el-table-column
	      prop="age"
	      label="年龄"
	      width="120">
	    </el-table-column>
	    
	    <el-table-column
	      fixed="right"
	      label="操作"
	      width="100">
	      <template slot-scope="scope">
	        <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
	        <el-button type="text" size="small">编辑</el-button>
	      </template>
	    </el-table-column>
	  </el-table>
</template>

<script>
	import axios from "axios"
	export default {
	    methods: {
	      handleClick(row) {
	        console.log(row);
	      }
	    },
		created() {
			axios.get('http://localhost:9080/v1/user/findAllUser').then(res=>{
				console.log(res)
				this.tableData = res.data.data;
			}
			)
			
		}
		,
	
	    data() {
	      return {
	        tableData: []
	      }
	    }
	  }
</script>

<style>
</style>